package com.naiterui.ehp.bs.agent.feign;

import java.util.List;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import com.naiterui.common.repository.page.PageVO;
import com.naiterui.ehp.bp.bo.statistics.AsConsultRecordBO;
import com.naiterui.ehp.bp.bo.statistics.AsOrderRecordBO;
import com.naiterui.ehp.bp.bo.statistics.AsProductRecordBO;
import com.naiterui.ehp.bp.bo.statistics.AsRecipelRecordBO;
import com.naiterui.ehp.bp.support.config.FeignConfiguration;
import com.naiterui.ehp.bp.support.exception.BusinessException;

/**
 * es搜索服务
 * 
 * @author yangfuya
 * @since 2022/2/16
 */
@FeignClient(name = "search", url = "${ehp.domain.search}", configuration = FeignConfiguration.class)
public interface ISearchFeignClient {

    /**
     * 查询经纪人数据统计-问诊相关记录
     */
    @GetMapping("inner/statistics/consult/record")
    List<AsConsultRecordBO> findConsultRecordIndex(@RequestParam("yesterday") String yesterday)
        throws BusinessException;

    /**
     * 查询昨日经纪人数据统计-处方相关记录
     */
    @GetMapping("inner/statistics/recipel/record")
    List<AsRecipelRecordBO> findRecipelRecordIndex(@RequestParam("yesterday") String yesterday)
        throws BusinessException;

    /**
     * 查询经纪人数据统计-订单相关记录
     */
    @GetMapping("inner/statistics/order/record")
    List<AsOrderRecordBO> findOrderRecordIndex(@RequestParam("yesterday") String yesterday) throws BusinessException;

    /**
     * 查询经纪人数据统计-药品售卖相关记录
     */
    @GetMapping("inner/statistics/product/record")
    List<AsProductRecordBO> findProductRecordIndex(@RequestParam("yesterday") String yesterday)
        throws BusinessException;

    /**
     * 分页获取订单
     */
    @GetMapping("inner/statistics/order/record/page")
    PageVO<AsOrderRecordBO> findOrderPage(@RequestParam("doctorId") Long doctorId,
        @RequestParam("orderSn") String orderSn, @RequestParam("pageNo") int pageNo,
        @RequestParam("pageSize") int pageSize) throws BusinessException;

}
